package com.baor.controller;

import com.baor.service.GoodsService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/separateList")
    public AjaxResult<?> separateList(@RequestBody Map<String, Object> params) {
        return goodsService.list(params);
    }

    @RequestMapping("/search")
    public AjaxResult<?> search(@RequestBody Map<String, Object> params) {
        return goodsService.search(params);
    }


    @RequestMapping("/goodsList")
    public AjaxResult<?> goodsList(@RequestBody Map<String, Object> params) {
        return goodsService.goodsList(params);
    }

    @RequestMapping("/goodsInfo")
    public AjaxResult<?> goodsInfo(@RequestBody Map<String, Object> params) {
        return goodsService.goodsInfo(params);
    }

    @RequestMapping("/separateConf")
    public AjaxResult<?> separateConf(@RequestBody Map<String, Object> params) {
        return goodsService.separateConf(params);
    }

}
